<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">

        <title>文件上传</title>
        
        <link rel="stylesheet" type="text/css" href="css/cropper.css" />
        <link rel="stylesheet" type="text/css" href="css/cropper-demo.css" />
        <link rel="stylesheet" type="text/css" href="css/contend.css" />
        <script>
            var docEl = window.document.documentElement,
                tid;
            function refreshRem() {
                var width = docEl.getBoundingClientRect().width;

                var px = width / 1280 * 100;
                docEl.style.fontSize = px + 'px';
            }

            window.addEventListener('resize', function() {
                clearTimeout(tid);
                tid = setTimeout(refreshRem, 300);
            }, false);
            window.addEventListener('pageshow', function(e) {
                if (e.persisted) {
                    clearTimeout(tid);
                    tid = setTimeout(refreshRem, 300);
                }
            }, false);

            refreshRem();
        </script>
	</head>
	<body id="home" v-cloak>
		<!--苏宁争鸣-->
        <section class="p-wapper">
        	<!--头部-->
	        <div class="header-box">
	        	<a href="javascript:;" @click="newtopic()">新话题</a>
	        	<a href="javascript:;" @click="alltopic()">往期争鸣</a>
	        	<a href="javascript:;" @click="about()">关于</a>
	        </div>
	        <div>
	            <form id="form_uploadScaleImg" enctype="multipart/form-data" method="post">
                    <div class="upload-img">
                        <p class="as-btn">选择文件</p>
                        <input type="file" name="upfile" id="cropper-input">
                    </div>
                    <div class="preview-container">
                        <input type="hidden" name="x" id="preview-x"/>
                        <input type="hidden" name="y" id="preview-y"/>
                        <input type="hidden" name="width" id="preview-width"/>
                        <input type="hidden" name="height" id="preview-height"/>
                        <input type="hidden" name="type" value="1"/>
                        <div class="image-container target" id="cropper-target">
                          <img src="" class="noavatar" />
                        </div>
                        <div class="large-wrapper">
                          <div class="image-container large" id="preview-large">
                            <div class="image-wrapper">
                              <img src="" class="noavatar" />
                            </div>
                          </div>                                               
                        </div>
                    </div>
                </form>
	        </div>
        </section>
        
        <!--<script type="text/javascript" src="js/jquery.min.js"></script>
        <script type="text/javascript" src="js/vue.min.js"></script>
        <script type="text/javascript" src="js/vue-config.js"></script>
        <script type="text/javascript" src="js/common.js"></script>
        <script src="https://passport.suning.com/ids/js/passport.js"></script>-->
        
        <script src="js/vue.min.js"></script>
        <script src="js/vue-resource.min.js"></script>
        <script src="js/zepto.min.js"></script>
        <script src="js/cropper.js"></script>
        <script src="js/common.js"></script>
        <!--<script src="http://sit1script.suning.cn/javascript/sn_da/sa_click.js"></script>-->
        
        <script type="text/javascript">
        	var vm = new Vue({
                el: '#home',
                data: {
	                items: [],
	                returnTag:"",
	                myList: true,
	                noData: false,
	                
                    err: false,
                    errCtt: ""
                },
                computed: {
                    
                },
                methods: {
                	newtopic: function(){
                    	location.href = "newtopic.html";
                    },
                    alltopic: function(){
                        location.href = "alltopic.html";
                    },
                },
                ready: function(){
                	//this.$http.post(DI.getTopic, {
                    this.$http.get('js/commont.json', {
                        'pageNo': 0,
                        'pageSize': 10
                    }).then(function(response) {
                        vm.items = response.data.data;
                    }, function(response) {
                        console.log(response);
                    });
                }
            });
        </script>
	</body>
</html>
